import request from '@/utils/request'

// 根据项目id查询项目详情
export const judgeScoreProject = (id) => {
    return request.get('score/judgeScoreProject/' + id)
}

// 根据项目id获取历史打分(单评分)
export const scoreRecordSignal = (id) => {
    return request.get(`score/scoreRecord?scoreProjectId=${id}`)
}
// 根据打分记录id查询详情(针对多模式)
export const scoreRecordMultiple = (id) => {
    return request.get(`score/scoreRecord/${id}`)
}
// 根据项目id获取全部的裁判
export const scoreJudge = (id) => {
    return request.get(`score/admin/scoreJudge/${id}`)
}
// 根据项目id获取全部的号码牌(不包括guest为0的号码)
export const numberList = (id) => {
    return request.get(`score/userScore/numberList/${id}`)
}
// 分页获取打分项目
export const scoreProjectPage = (id) => {
    return request.get(`score/admin/scoreProject/page?type=0`)
}
// 根据号码修改分数
export const scoreNumUpdateSingnal = (data) => {
    return request.post(`score/scoreRecord/number`,data)
}

// 获取全部分数
export const scorePanelFinal = (data) => {
    return request.get(`score/admin/scorePanel/final?projectId=${data.projectId}`)
}
// 获取总览分数
export const scoreUserScore = (id,data) => {
    return request({url:`score/userScore/${id}`,
    method: 'get',
    params: data,})
}
// 获取单个裁判全部分数
export const scorePanelscoreRecord = (data) => {
    return request.post(`score/admin/scorePanel/scoreRecord`,data)
}
// 根据id对比赛选手晋级和取消晋级操作
export const promotionById = (id) => {
    return request.put(`score/userScore/promotion/${id}`)
}

// 创建Guest比赛选手
export const editGuest = (id, data) => { 
	return request.put(`score/userScore/${id}`, data)
}

// 删除Guest比赛选手
export const deleteGuest = (id) => { 
	return request.delete(`score/userScore/${id}`)
}

// 创建Guest比赛选手
export const addGuest = (data) => { 
	return request.post(`score/userScore/sponsorHandler`, data)
}


// 提交打分
export const scoreSubmit = (data) => { 
    return request.post(`score/scoreRecord/submit`, data)
}

// 根据项目id获取历史打分
export const getScoreRecord = (data) => { 
    return request({url:`score/scoreRecord`,
    method: 'get',
    params: data,})
}